﻿using MediatR;
using RBAC.LuFang.API.Application.Command.BreedCommand;
using RBAC.LuFang.Domin.Services.TraceabilityService;

namespace RBAC.LuFang.API.Application.CommandHandlers.BreedCommandHandler
{
    //显示养殖信息
    public class BreedSelectCommandHandler:IRequestHandler<BreedSelectCommand,List<BreedInfo>>
    {
        private readonly IGoodsService _goodsService;

        public BreedSelectCommandHandler(IGoodsService goodsService)
        {
            _goodsService = goodsService;
        }

        public async Task<List<BreedInfo>> Handle(BreedSelectCommand request, CancellationToken cancellationToken)
        {
            return await _goodsService.GetBreed(request.goodsid);
        }
    }
}
